﻿<UserControl x:Class="TouchFramework.ControlHandlers.RssList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="360" Width="300">

    <UserControl.Resources>
        
        <DataTemplate x:Key="RssItemTemplate">
            <StackPanel Orientation="Vertical">
                <TextBlock Text="{Binding Path=Title.Text}" TextWrapping="Wrap" Margin="2,2,2,2" />
                <Rectangle Width="10" Height="1" />
                <TextBlock Text="{Binding Path=PublishDate.DateTime}" TextWrapping="Wrap" Margin="2,2,2,2" TextAlignment="Right" />
                <Rectangle Width="10" Height="3" />
            </StackPanel>
        </DataTemplate>
        
        <Style TargetType="ListBox">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBox">
                                
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                         VerticalScrollBarVisibility="Hidden">
                            <StackPanel Orientation="Vertical"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Left"
                           IsItemsHost="True"/>
                        </ScrollViewer>
                            
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </UserControl.Resources>

    
        <Border Name="OuterFrame" CornerRadius="5">
            <Border.Background>
                <LinearGradientBrush Opacity="0.8">
                    <GradientStop Color="Silver" Offset="0.0"/>
                    <GradientStop Color="AntiqueWhite" Offset="1.0"/>
                </LinearGradientBrush>
            </Border.Background>
            <Border CornerRadius="5" Background="Black"
                                Margin="6,6,6,6">

            <Grid Background="Black">
                <Label Name="label1" Background="Black" Foreground="White" FontSize="20" Margin="12,6,12,0" Height="53" VerticalAlignment="Top" HorizontalAlignment="Right" />
                <ListBox Margin="12,65,12,12" Name="listBox1"
            ItemTemplate="{StaticResource RssItemTemplate}" Background="Black" Foreground="White">
                </ListBox>
            </Grid>
        </Border>
        </Border>
</UserControl>
